-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): allow local execution transpiler overriding with env var #16037
feat(core): allow local execution transpiler overriding with env var #16037
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, I'd like to move forward with it.
Can you rename it and document it inside of environment-variables.md
?
Done! |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Currently the transpiler being picked for local execution is entirely depending on if
@swc-node/register'
is installed or not. While this works for the overwhelmingly large majority of cases there are times when we may want to force the transpiling to use ts-node even though swc-node is installed. For example in our CI, we use CircleCI arm64 resources to run all of our build steps (as they end up cheaper than the x86/amd64 resources) except for when we dockerize our servers, we dockerize our servers on x86 Docker containers (since they are being deployed to x86 servers so we can't* build them on arm resources). This means that if we have@swc-node/register
installed then when our dependencies are installed on arm resources we have arm swc native code compiled which doesn't run when we call local executions in our step that dockerizes (since its x86 and we do not have x86 swc compiled binaries).Expected Behavior
This PR would allow us to set an env var to tell Nx to use
ts-node
even though swc-register is installed. This allows us to have local executions happening for all cases it can work, like dev'ing locally, or on most of our CI steps, but then set it to ts-node when we know we need it to fallback.There may be another way to get around this I am missing so if there is I am more than happy to close this and do that!
Related Issue(s)
Fixes #